package com.hmall.order.config;


import com.hmall.order.interceptor.UserInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @Description UseConfig
 * @Author zhengyuan&junjun
 * @Date 2024-11-15
 */
@Configuration
public class UseConfig extends WebMvcConfigurationSupport {
   @Autowired
    private UserInterceptor userInterceptor;
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
      registry.addInterceptor(userInterceptor)
              .addPathPatterns("/order/**");
    }
}
